<?php

namespace App\Services\Api;

/**
 *获取筛选条件接口：技术路径，领域
 */
class CMS50101
{
    public $apiCode = 'CMS#50101';
    public $typeId = -1;
    public $pageNo = 1;
    public $pageSize = 10;
    public $domainId = -1;

    public function getInitPostData($postData)
    {
        return [
            'typeId' => $this->getTypeId(@$postData['typeId']),
            'pageNo' => $this->getPageNo(@$postData['pageNo']),
            'pageSize' => $this->getPageSize(@$postData['pageSize']),
            'domainId' => $this->getDomainId(@$postData['domainId']),
        ];
    }

    public function getTypeId($typeId = '')
    {
        return $typeId ? $typeId : $this->typeId;
    }

    public function getPageNo($pageNo = '')
    {
        return $pageNo ? $pageNo : $this->pageNo;
    }

    public function getPageSize($pageSize = '')
    {
        return $pageSize ? $pageSize : $this->pageSize;
    }

    public function getDomainId($domainId = '')
    {
        return $domainId ? $domainId : $this->domainId;
    }

    public function getInitApiCode()
    {
        return $this->apiCode;
    }

}
